package com.bw.base.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding

abstract class BaseActivity <VDB: ViewDataBinding>: AppCompatActivity() {
    protected lateinit var mdataBinding:VDB
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mdataBinding= DataBindingUtil.setContentView(this,getLayoutId())
        initView()
        initData()
        handObserver()
    }

    abstract fun getLayoutId(): Int
    abstract fun initView()
    abstract fun initData()
    open fun handObserver(){

    }
}